<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>后台管理 - 易买网</title>
    <link type="text/css" rel="stylesheet" href="../css/style.css"/>
    <script type="text/javascript" src="../scripts/function-manage.js"></script>
</head>

<body>
<%@ include file="/WEB-INF/manage/common/head.jsp" %>
<%@ include file="/WEB-INF/manage/common/position.jsp" %>
<div id="main" class="wrap">
    <%@include file="/WEB-INF/manage/common/left.jsp" %>
    <div class="main">
        <h2>用户管理</h2>
        <div class="manage">
            <table class="list">
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>Email</th>
                    <th>手机</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${userPage.records}" var="user">
                    <tr>
                        <td class="first w4 c">${user.userId}</td>
                        <td class="w1 c">${user.userName}</td>
                        <td class="w2 c">${user.sex eq 'T' ? '男':'女'}</td>
                        <td>${user.email}</td>
                        <td class="w4 c">${user.mobile}</td>
                        <td class="w1 c"><a href="/user/update_input?userId=${user.userId}">修改</a> <a
                                href="javascript:Delete('/user/delete?userId=${user.userId}');">删除</a></td>
                    </tr>
                </c:forEach>
            </table>
        </div>
        <div class="pager">
            <ul class="clearfix">
                <li><a href="/user/list?current=${userPage.hasPrevious()?userPage.current-1:1}">上一页</a>
                </li>
                <c:forEach var="index" begin="1" end="${totalPage}" step="1">
                    <li class="current"><a href="/user/list?current=${index}">${index}</a></li>
                </c:forEach>
                <li>
                    <a href="/user/list?current=${userPage.hasNext()?userPage.current+1:totalPage}">下一页</a>
                </li>
            </ul>

        </div>
        <div class="clear"></div>
    </div>
    <%@ include file="/WEB-INF/common/footer.jsp" %>
</body>
</html>
